home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / FAQ.SWG / 0028_OWL-BWCC FAQ.pas < prev    next >
Pascal/Delphi Source File  |  1994-05-26  |  5KB  |  113 lines

  1. SECTION 8 - OWL/BWCC
  2.  
  3. This document contains information that is most often provided
  4. to users of this section.  There is a listing of common
  5. Technical Information Documents that can be downloaded from the
  6. libraries, and a listing of the five most frequently asked
  7. questions and their answers.
  8.                                     
  9. TI1203   Using Validators in OWL Applications
  10. TI1262   Installation notes regarding Turbo Debugger for Windows
  11. TI1171   Borland problem report form
  12. TI607    Description and illustration of printing in Windows
  13. TI992    Demonstration of collections and listboxes in Windows
  14.  
  15. Q.   "Why do I get 'Application Error -1' when my dialog tries
  16.      to execute?"
  17.  
  18. A.   This error is basically a "Failure to create dialog" error.
  19.      Most often it is caused by one of two things:
  20.  
  21.      1.  Failure to include "BWCC" in your USES clause.  If you
  22.          designed a dialog in Resource Workshop using the 
  23.          Borland "look and feel", you need to include "BWCC" in
  24.          your USES clause.
  25.  
  26.      2.  Incorrect dialog identifier passed to dialog's Init
  27.          method.  Make sure the identifier you are passing to
  28.          the dialog's Init method is the same one you are using
  29.          in Resource Workshop.
  30.  
  31. Q.   "How can I obtain the latest copy of BWCC.DLL?"
  32.  
  33. A.   Download BWCC.ZIP from library 2.
  34.  
  35. Q.   "What causes the 'Data Segment too large' compiler error?
  36.      How do I get rid of it?"
  37.  
  38. A.   This error occurs when your application has more than 64K
  39.      of information that it is trying to put into your
  40.      application's data segment.  Note that you only have one 64K
  41.      data segment to work with, so you should manage this memory
  42.      judiciously. The following data is kept in an Object Windows
  43.      application's data segment:
  44.  
  45.           * All global variables
  46.           * All typed constants
  47.           * Stack
  48.           * Local Heap (used internally by Windows)
  49.           * Virtual Method Table
  50.  
  51.      To avoid this error, you should take the following steps:
  52.  
  53.           * Avoid large global variables.  Try instead declaring
  54.             larger variables on the heap using New() or
  55.             GetMem(), and keeping a pointer to that variable
  56.             globally.
  57.  
  58.           * Keep your stack down to a reasonable size.  16K is
  59.             usually a good amount for most applications.
  60.  
  61.           * Avoid making functions in your objects Virtual
  62.             unless they have to be; this will reduce the size of
  63.             the Virtual Method Table.
  64.  
  65. Q.   "How can I enable or disable a particular control in a
  66.      dialog box?
  67.  
  68. A.   Use the EnableWindow(Wnd: Hwnd, Enable: Bool) API function. 
  69.      It takes two parameters, the handle to the window (remember
  70.      a control is a window) to be enabled/disabled and a boolean
  71.      value - True for enable and False for disable.
  72.  
  73. Q.   "How do I obtain the handle or ID of a control?" 
  74.  
  75. A.   If you have a pointer to a control object, OWL will give
  76.      you the window handle automatically through the HWindow
  77.      field; PointerToMyControl^.HWindow is the window handle.
  78.  
  79.      If you know the handle of a control, you can obtain the ID
  80.      by calling the GetDlgCtrlID() API function:
  81.  
  82.         ControlID := GetDlgCtrlID(ControlHandle);
  83.  
  84.      If you don't have a pointer to your control, but know the
  85.      ID of a control, you can obtain the handle by calling the
  86.      GetDlgItem() API function:
  87.  
  88.         ControlHandle := GetDlgItem(DialogHandle, ControlID);
  89.    
  90. Q.   "How can I put Object Windows objects in a DLL?"
  91.  
  92. A.   OWL was not designed to be used in a DLL.  Some users have
  93.      managed to get this to work in some cases, but it is not a
  94.      practice that Borland recommends.  For info on launching 
  95.      windows and dialogs from a DLL without OWL, download
  96.      APIDLL.PAS from library 2.
  97.  
  98. Q.   "Can a TFileWindow object edit files larger than 64K?"
  99.  
  100. A.   No.  A TFileWindow is really just a multi-line edit control
  101.      that takes up the whole client area.  An edit control's
  102.      buffer is allocated from the local heap, and therefore is 
  103.      usually much smaller than 32K.  If you would like to have 
  104.      more buffer space, download GLBEDT.ZIP from library 8 - this
  105.      file provides you with a greater buffer for the TEdit and
  106.      TFileWindow objects.
  107.  
  108. Q.   "How do I apply to become a beta tester for a future
  109.      Borland Pascal product?"
  110.  
  111. A.   Download SURVEY.ZIP from library 2.
  112.     
  113.